//
//  BaseCollectionViewDelegateProxy.h
//  mobile
//
//  Created by Demi on 16/03/2017.
//  Copyright © 2017 azazie. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface BaseCollectionViewDelegateProxy : NSObject <UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>

- (instancetype)initWithCellClass:(Class)cellClass collectionView:(__kindof UICollectionView *)collectionView NS_DESIGNATED_INITIALIZER;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

@property (nonatomic, copy, nullable) NSArray *items;
@property (nonatomic, copy, nullable) CGSize(^cellSizingBlock)(id item, NSInteger index);
@property (nonatomic, copy) void(^cellBlock)(id item, NSInteger index, __kindof UICollectionViewCell *cell);

- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath;
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section;
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView;
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath;

@end

NS_ASSUME_NONNULL_END
